package com.cpi.cornpp.poplanned.reals.converter;

import com.cpi.cornpp.poplanned.reals.dto.PoPlannedRealsDTO;
import com.cpi.cornpp.poplanned.reals.view.PoPlannedRealsView;

/**
 * Po Planned Reals Converter
 * @author Edgar Joao
 *
 */
public class PoPlannedRealsConverter {
	
	/**
	 * PoPlanned Reals Converter View to DTO
	 * @param view
	 * @return
	 */
	public PoPlannedRealsDTO converterPoPlannedRealsViewToDTO(PoPlannedRealsView view){
		PoPlannedRealsDTO poPlannedRealsDTO = null;
		poPlannedRealsDTO = new PoPlannedRealsDTO();
		poPlannedRealsDTO.setPurchaseOrderId(view.getPurchaseOrderId());
		poPlannedRealsDTO.setPoNumber(view.getPoNumber());
		return poPlannedRealsDTO;
	}
	
	
	/**
	 * PoPlanned Reals Converter View to DTO
	 * @param view
	 * @return
	 */
	public PoPlannedRealsView converterPoPlannedRealsDtoToView(PoPlannedRealsDTO dto){
		PoPlannedRealsView poPlannedRealsView = null;
		poPlannedRealsView = new PoPlannedRealsView();
		poPlannedRealsView.setPurchaseOrderId(dto.getPurchaseOrderId());		
		poPlannedRealsView.setPoNumber(dto.getPoNumber());
		return poPlannedRealsView;
	}

}
